<template>
  <div>
    <header-top :type="type"></header-top>
    <el-menu
      :default-active="defaultActive"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
          <el-menu-item index="1"><router-link tag="li" to="/dot">快递管理</router-link></el-menu-item>
          <el-menu-item index="2"><router-link tag="li" to="/dotinfo">网点资料</router-link></el-menu-item>
      </el-menu>
    </div>
</template>
<script>
  import HeaderTop from './../../common/header'
  export default {
    components:{
      'header-top':HeaderTop
    },
    name: 'header-item',
    props: ['activeIndex'],
    data() {
      return {
        defaultActive: this.activeIndex,
        type:'网点'
      };
    },
    methods: {
      handleSelect(key, keyPath) {
        console.log(key, keyPath);
      }
    }
  }
</script>
<style  scoped>
ul.el-menu-demo.el-menu--horizontal.el-menu {
    display: flex;
    align-items: center;
    justify-content: center;
}
</style>